package com.server.questionbank.snframe.service.CourseService;

import com.server.questionbank.snframe.domain.Course.Type.CourseLabel;
import com.server.questionbank.snframe.domain.Course.Type.CourseType;
import com.server.questionbank.snframe.domain.Course.Result.CourseFigures;
import com.server.questionbank.snframe.domain.ResDTO.PageResult;
import com.server.questionbank.snframe.domain.Course.TCourse;
import com.server.questionbank.snframe.domain.ResDTO.SearchResult;

import java.util.List;

public interface TCourseService {
    // 获取所有课程
    public List<TCourse> getAllCourse();

    // 获取课程信息
    public TCourse getCourseById(Long courseId);

    // 根据课程id查询类型
    public List<CourseType> getCourseType(Long courseId);

    // 根据课程id查询标签
    public List<CourseLabel> getCourseLabel(Long courseId);

    // 设置课程介绍
    public boolean setCourseIntroduce(Long courseId, String courseIntroduce);

    // 获取课程介绍
    public String getCourseIntroduce(Long courseId);

    // 创建课程
    public boolean createCourse(TCourse course, String coverData, List<Long> courseType, List<Long> courseLabel) throws Exception;

    // 修改课程封面
    public void updateCover(Long courseId, String coverData);

    // 查询热门课程
    public List<CourseFigures> getHotCourse();

    // 查询课程（可选条件）
    public SearchResult<PageResult<CourseFigures>> findCourseByConditions(Long courseId, Long memberId, Long teacherId, String search, Long difficultyId, List<Long> type, List<Long> label, List<Long> excludeCourseId, Long pageNum, Long pageSize, Double figureWeight, Double userLikeWeight, Double timeWeight, Boolean explore);
    public SearchResult<PageResult<CourseFigures>> findCourseByConditions(Long courseId, Long teacherId, String search, Long difficultyId, List<Long> type, List<Long> label, List<Long> excludeCourseIdList, Long pageNum, Long pageSize, Boolean explore);

    // 查询推荐课程
    public List<CourseFigures> getRecommendCourse(Long courseId,  Long recommendCount);

}
